package com.wanqing.community.bean;

/**
 * Created by pc on 2016/2/14.
 */
import org.apache.commons.lang.StringUtils;

import java.math.BigDecimal;

public class GoodsBean {
    private Integer id;

    private String name;

    private String purchaseDate;
    private String purchaseDateStr;

    private String purchaseBeginDate;
    private String purchaseEndDate;



    private Integer repertory;

    private BigDecimal originalPrice;

    private BigDecimal makerPrice;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPurchaseDate() {
        return purchaseDate;
    }

    public void setPurchaseDate(String purchaseDate) {
        this.purchaseDate = purchaseDate;
        this.purchaseDateStr =
                StringUtils.substring(this.purchaseDate, 0, StringUtils.lastIndexOf(this.purchaseDate, "."));
    }

    public Integer getRepertory() {
        return repertory;
    }

    public void setRepertory(Integer repertory) {
        this.repertory = repertory;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getMakerPrice() {
        return makerPrice;
    }

    public void setMakerPrice(BigDecimal makerPrice) {
        this.makerPrice = makerPrice;
    }

    public String getPurchaseBeginDate() {
        return purchaseBeginDate;
    }

    public void setPurchaseBeginDate(String purchaseBeginDate) {
        this.purchaseBeginDate = purchaseBeginDate;
    }

    public String getPurchaseEndDate() {
        return purchaseEndDate;
    }

    public void setPurchaseEndDate(String purchaseEndDate) {
        this.purchaseEndDate = purchaseEndDate;
    }

    public String getPurchaseDateStr() {
        return purchaseDateStr;
    }

}
